The present invention relates to an image processing method and apparatus, and more particularly, to an image processing method and apparatus for performing color matching according to ambient light.
FIG. 1 is a conceptual view of general color matching.
Input RGB data is converted by an input profile to XYZ data of a color space which does not depend on any devices. Since an output device cannot express colors outside the color reproduction range of the output device, gamut mapping is performed on the inputted data, which has been converted to the data in the device-independent color space, such that all colors of the inputted data fall within the color reproduction range of the output device. After the gamut mapping is performed, the inputted data is converted from the device-independent color space to CMYK data of a color space which is dependent on the output device.
In color matching, a reference white point and ambient light are fixed. For instance, according to a profile specified by the International Color Consortium (ICC), a Profile Connection Space (PCS) for associating profiles uses XYZ values or Lab values based on the D50 characteristic. Therefore, correct color reproduction is guaranteed when an inputted original document and a printout are viewed under an illuminant of the D50 characteristic. Under an illuminant of other characteristics, correct color reproduction is not guaranteed.
When a sample (e.g., an image) is viewed under different illuminants, XYZ values of the viewed sample naturally vary. The XYZ values under various illuminants are predicted by conversion methods such as (1) ratio conversion, (2) Von Kries conversion, and (3) prediction formula using a color perception model.
In the ratio conversion method, XYZ values under a reference white point W1 are converted to XYZ values under a reference white point W2 at a ratio of W2/W1. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1(Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2 (Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by the ratio conversion:                                                                         X2                =                                                      Xw2                    Xw1                                    ⁢                  X1                                                                                                        Y2                =                                                      Yw2                    Yw1                                    ⁢                  Y1                                                                                                        Z2                =                                                      Zw2                    Zw1                                    ⁢                  Z1                                                                    }                            (        1        )            
According to the Von Kries conversion, XYZ values under the reference white point W1 are converted to XYZ values under the reference white point W2 at a ratio of W2′/W1′ in a human color perception space PQR. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 do not become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1 (Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2 (Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by Von Kries conversion:                               [                                                    X2                                                                    Y2                                                                    Z2                                              ]                =                                                            [                                                                                                                                                                                                                                                    inv                        ⁢                        _                        ⁢                        Mat                                                                                                                                                                                                                                            ]                            ⁡                              [                                                                                                    Pw2                        Pw1                                                                                    0                                                              0                                                                                                  0                                                                                      Qw2                        Qw1                                                                                    0                                                                                                  0                                                              0                                                                                      Rw2                        Rw1                                                                                            ]                                      ⁡                          [                                                                                                                                                                                                      Mat                                                                                                                                                                                                ]                                ⁡                      [                                                            X1                                                                              Y1                                                                              Z1                                                      ]                                              (        2        )            
where                               [                                                    Pw2                                                                    Qw2                                                                    Rw2                                              ]                =                              [                                                                                                                                                                                Mat                                                                                                                                                                          ]                    ⁡                      [                                                            Xw2                                                                              Yw2                                                                              Zw2                                                      ]                                              (        3        )                                          [                                                    Pw1                                                                    Qw1                                                                    Rw1                                              ]                =                              [                                                                                                                                                                                Mat                                                                                                                                                                          ]                    ⁡                      [                                                            Xw1                                                                              Yw1                                                                              Zw1                                                      ]                                              (        4        )                                          [                                                                                                                                                                            inv                  ⁢                  _                  ⁢                  Mat                                                                                                                                                                    ]                =                  [                                                    1.85995                                                              -                  1.12939                                                            0.21990                                                                    0.36119                                            0.63881                                            0                                                                    0                                            0                                            1.08906                                              ]                                    (        5        )                                          [                                                                                                                                                          Mat                                                                                                                                                    ]                =                  [                                                    0.44024                                            0.70760                                                              -                  0.08081                                                                                                      -                  0.22630                                                            1.16532                                            0.04570                                                                    0                                            0                                            0.91822                                              ]                                    (        6        )            
To convert XYZ values under a viewing condition VC1 (including W1) to XYZ values under a viewing condition VC2 (including W2), the prediction formula using a color perception model, which is a conversion method such as CIE CAM 97s using the human color perception space QMH (or JCH) is employed. Herein, Q for QMH represents brightness, M represents colorfulness, and H represents hue quadrature or hue angle. J for JCH represents lightness, C represents chroma, and H represents hue quadrature or hue angle. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 are not equal to the Lab values under W2, as similar to the case of the Von Kries conversion. Assuming that XYZ values of a sample under W1 (Xw1, Yw1 Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2 (Xw2, Yw2, Zw2) are (X2, Y2, Z2), the prediction formula using color appearance model performs the following conversion:(X1, Y1, Z1)→[forward conversion of CIE CAM97s]→(Q, M, H) or (J, C, H)→[inverse conversion of CIE CAM97s] (X2, Y2, Z2)
In other words, if it is assumed that XYZ values under a reference white point which varies depending on a ratio conversion can be converted, the contour lines of hue in the Lab color spaces under various reference white points are always the same. However, if human color perception is taken into consideration, such as the Von Kries conversion or prediction formula using a color perception model, the contour lines of hue in the Lab color spaces under different reference white points vary depending on the reference white points.
Because of the above reason, if gamut mapping (hue restoration) defined under one Lab color space is applied to color matching under different reference white points, the human vision perceives the hue as inconsistent.
Moreover, in the current ICC profile, since the PCS is limited to XYZ values or Lab values based on D50 characteristic, color matching corresponding to ambient light cannot be performed.